From: Giovanni Campagna Date: Thu, 28 Oct 2010 20:28:17 +0000 (+0200) Subject: Do not remove destroyed actors from their container X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9590 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a19e8d58f5d30f82f97a79ffe007143a627ac3e5;p=gnome-shell.git Do not remove destroyed actors from their container The container already connects to destroy and will do that for us, preventing a warning. https://bugzilla.gnome.org/show_bug.cgi?id=633028 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index f572e1354..51b2989d8 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -155,20 +155,24 @@ PopupBaseMenuItem.prototype = { this._children.push({ actor: child, column: column, span: span }); - this.actor.connect('destroy', Lang.bind(this, function () { this.removeActor(child); })); + this.actor.connect('destroy', Lang.bind(this, function () { this._removeChild(child); })); this.actor.add_actor(child); }, - removeActor: function(child) { + _removeChild: function(child) { for (let i = 0; i < this._children.length; i++) { if (this._children[i].actor == child) { this._children.splice(i, 1); - this.actor.remove_actor(child); return; } } }, + removeActor: function(child) { + this.actor.remove_actor(child); + this._removeChild(child); + }, + setShowDot: function(show) { if (show) { if (this._dot)